unit uBaza;

interface

uses
  DB, JvDataSource, DBTables, JvBDEQuery, JvComponentBase, JvBDEProgress,
  Classes, DBXMSSQL, SqlExpr, uADStanIntf, uADStanOption, uADStanError,
  uADGUIxIntf, uADPhysIntf, uADStanDef, uADStanPool, uADPhysManager,
  uADCompClient, uADPhysODBCBase, uADPhysMSSQL, uADStanAsync, uADStanParam,
  uADDatSManager, uADDAptIntf, uADDAptManager, uADCompDataSet;

type
  TDMBaza = class(TDataModule)
    ADConnSPG: TADConnection;
    ADTransaction: TADTransaction;
    ADPhysMSSQLDriverLink1: TADPhysMSSQLDriverLink;
    procedure DBSPGAfterConnect(Sender: TObject);
    procedure ADConnSPGAfterConnect(Sender: TObject);
  private
    { Private declarations }
    DBInfo : AnsiString;      //informacja o bazie danych Alians@DB_name
    DBServer, DBName : AnsiString;
  public
    { Public declarations }
    function GetDBInfo : AnsiString;
    procedure setDBServerInfoName(text : AnsiString);
    procedure setDBNameInfoName(text : AnsiString);
  end;

var
  DMBaza: TDMBaza;

implementation

{$R *.dfm}

procedure TDMBaza.ADConnSPGAfterConnect(Sender: TObject);
begin
  DBInfo := DBServer +'@'+ DBName
end;

procedure TDMBaza.DBSPGAfterConnect(Sender: TObject);
begin
  DBInfo := DBServer +'@'+ DBName;
end;

function TDMBaza.GetDBInfo : AnsiString;
begin
  Result := DBInfo;
end;

procedure TDMBaza.setDBServerInfoName(text : AnsiString);
begin
  DBServer := text;
end;

procedure TDMBaza.setDBNameInfoName(text : AnsiString);
begin
  DBName:= text;
end;

end.
